package com.gitee.ywj1352.jpa.jpa.controller;

import com.gitee.ywj1352.jpa.jpa.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @GetMapping("/Dall")
    public Object hi(){
        return userService.getUserList();
    }

    @GetMapping("/Pall")
    public Object hi2(){
        return userService.hi();
    }

    @PostMapping("/success")
    public String success(){
        return "success";
    }

}
